package com.ruoyi.production.service.impl;

import com.ruoyi.production.domain.WorkReportComponents;
import com.ruoyi.production.mapper.WorkReportComponentsMapper;
import com.ruoyi.production.service.IWorkReportComponentsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 生产绩效Service业务层处理
 *
 * @author ruoyi
 * @date 2022-09-05
 */
@Service
public class WorkReportComponentsServiceImpl implements IWorkReportComponentsService {
    @Autowired
    private WorkReportComponentsMapper workReportComponentsMapper;

    /**
     * 查询生产绩效
     *
     * @param id 生产绩效主键
     * @return 生产绩效
     */
    @Override
    public WorkReportComponents selectWorkReportComponentsById(Long id) {
        return workReportComponentsMapper.selectWorkReportComponentsById(id);
    }

    /**
     * 查询生产绩效列表
     *
     * @param workReportComponents 生产绩效
     * @return 生产绩效
     */
    @Override
    public List<WorkReportComponents> selectWorkReportComponentsList(WorkReportComponents workReportComponents) {
        return workReportComponentsMapper.selectWorkReportComponentsList(workReportComponents);
    }

    /**
     * 新增生产绩效
     *
     * @param workReportComponents 生产绩效
     * @return 结果
     */
    @Override
    public int insertWorkReportComponents(WorkReportComponents workReportComponents) {
        return workReportComponentsMapper.insertWorkReportComponents(workReportComponents);
    }

    /**
     * 修改生产绩效
     *
     * @param workReportComponents 生产绩效
     * @return 结果
     */
    @Override
    public int updateWorkReportComponents(WorkReportComponents workReportComponents) {
        return workReportComponentsMapper.updateWorkReportComponents(workReportComponents);
    }

    /**
     * 批量删除生产绩效
     *
     * @param ids 需要删除的生产绩效主键
     * @return 结果
     */
    @Override
    public int deleteWorkReportComponentsByIds(Long[] ids) {
        return workReportComponentsMapper.deleteWorkReportComponentsByIds(ids);
    }

    /**
     * 删除生产绩效信息
     *
     * @param id 生产绩效主键
     * @return 结果
     */
    @Override
    public int deleteWorkReportComponentsById(Long id) {
        return workReportComponentsMapper.deleteWorkReportComponentsById(id);
    }
}
